package org.infodavid.common.impl.services.validators;

import java.util.Collection;

import javax.persistence.PersistenceException;

import org.infodavid.common.impl.services.helpers.ValidatorHelper;
import org.infodavid.common.model.ITemplateVersion;
import org.infodavid.common.services.IApplicationContext;
import org.infodavid.common.services.exceptions.ServiceException;

/**
 * The Class DefaultTemplateValidator.
 */
public class DefaultTemplateVersionValidator extends AbstractValidator<ITemplateVersion> {

	/*
	 * See super class or interface. (non-Javadoc)
	 * @see org.infodavid.common.services.validators.IValidator#validate(org.infodavid.common.services.
	 * IApplicationContext, java.io.Serializable)
	 */
	public void validate(final IApplicationContext context, final ITemplateVersion value)
	    throws ServiceException, PersistenceException {
		super.validate(context, value);
	}

	/*
	 * See super class or interface. (non-Javadoc)
	 * @see org.infodavid.common.services.validators.IValidator#validate(org.infodavid.common.services.
	 * IApplicationContext, java.util.Collection)
	 */
	public void validate(final IApplicationContext context, final Collection<ITemplateVersion> items)
	    throws ServiceException, PersistenceException {
		ValidatorHelper.validateKeyNameNotNull(context, items, this);
	}
}
